﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TJDevHouse.Starcraft.Game
{
	/// <summary>
	/// A player in the game
	/// </summary>
	public class Player
	{
		/// <summary>
		/// This player's unique ID
		/// </summary>
		public int ID { get; private set; }

		/// <summary>
		/// The name of this player
		/// </summary>
		public string Name { get; private set; }

		/// <summary>
		/// The force (team) this player is on
		/// </summary>
		public Force Force { get; internal set; }

		/// <summary>
		/// Whether this player is an ally of the client player
		/// </summary>
		public bool IsAlly { get; set; }

		/// <summary>
		/// Whether this player is an enemt of the client player
		/// </summary>
		public bool IsEnemy { get; set; }

		/// <summary>
		/// Whether this player is the neutral player (owner of resources,
		/// critters, etc.)
		/// </summary>
		public bool IsNeutral { get; set; }

		/// <summary>
		/// The amount of minerals this player has
		/// </summary>
		public int Minerals { get; set; }

		/// <summary>
		/// The amount of vespene gas this player has
		/// </summary>
		public int VespeneGas { get; set; }

		/// <summary>
		/// The total amount of supply units this player has
		/// </summary>
		public int SupplyTotal { get; set; }

		/// <summary>
		/// The number of supply units used
		/// </summary>
		public int SupplyUsed { get; set; }

		/// <summary>
		/// The race this player chose at startup.
		/// 
		/// Note: Due to the ability of protoss dark archons
		/// to create renegade units, it should not be assumed that
		/// this player will only control one race.
		/// </summary>
		public RaceTypes.Race Race { get; set; }

		public Player(int id, string name)
		{
			ID = id;
			Name = name;

			IsAlly = false;
			IsEnemy = false;
			IsNeutral = false;
		}

		public override string ToString()
		{
			return "(" + ID + ") " + Name;
		}
	}
}
